<template>
	<view class="container">
		<uni-section title="食物列表展示" sub-title="" type="line">
			<uni-list v-for="i in list">
				<uni-list-item :title="i.comment" :to="'../commentdetail/commentdetail?id='+i.id" note=""></uni-list-item>
				
			</uni-list>
		</uni-section>

	</view>
</template>

<script>
	export default {
		data() {
			return {
list:[]
			}
		},
		methods: {

		},
		onLoad() {
			uni.request({
				url: 'http://localhost:8090/foodapp/comment/list',
				method: 'POST',
				data: {},
				success: res => {
					this.list=res.data.list
				},
				fail: () => {},
				complete: () => {}
			});
		}
	}
</script>

<style>
	.container {
		padding: 20px;
		font-size: 14px;
		line-height: 24px;
	}
</style>
